#--------------------------------------------------------------------
# ISO countrycodes for convenience.
#
# This file was derived electronically from the ISO 3166 documents
# available at http://stiwww.epfl.ch/utile/iso_3166.html
#
#--------------------------------------------------------------------
# COPYING:
# I do not believe it is legal or ethical to claim copyright in
# a simple list of facts, which is all this is.  So no copyright
# is asserted.
#--------------------------------------------------------------------

_iso_countrycode = {
        'AD': ('Andorra', 'AND', '020'),
        'AE': ('United Arab Emirates', 'ARE', '784'),
        'AF': ('Afghanistan', 'AFG', '004'),
        'AG': ('Antigua and Barbuda', 'ATG', '028'),
        'AI': ('Anguilla', 'AIA', '660'),
        'AL': ('Albania', 'ALB', '008'),
        'AM': ('Armenia', 'ARM', '051'),
        'AN': ('Netherlands Antilles', 'ANT', '530'),
        'AO': ('Angola', 'AGO', '024'),
        'AQ': ('Antarctica', 'ATA', '010'),
        'AR': ('Argentina', 'ARG', '032'),
        'AS': ('American Samoa', 'ASM', '016'),
        'AT': ('Austria', 'AUT', '040'),
        'AU': ('Australia', 'AUS', '036'),
        'AW': ('Aruba', 'ABW', '533'),
        'AZ': ('Azerbaijan', 'AZE', '031'),
        'BA': ('Bosnia and Herzegowina', 'BIH', '070'),
        'BB': ('Barbados', 'BRB', '052'),
        'BD': ('Bangladesh', 'BGD', '050'),
        'BE': ('Belgium', 'BEL', '056'),
        'BF': ('Burkina Faso', 'BFA', '854'),
        'BG': ('Bulgaria', 'BGR', '100'),
        'BH': ('Bahrain', 'BHR', '048'),
        'BI': ('Burundi', 'BDI', '108'),
        'BJ': ('Benin', 'BEN', '204'),
        'BM': ('Bermuda', 'BMU', '060'),
        'BN': ('Brunei Darussalam', 'BRN', '096'),
        'BO': ('Bolivia', 'BOL', '068'),
        'BR': ('Brazil', 'BRA', '076'),
        'BS': ('Bahamas', 'BHS', '044'),
        'BT': ('Bhutan', 'BTN', '064'),
        'BV': ('Bouvet Island', 'BVT', '074'),
        'BW': ('Botswana', 'BWA', '072'),
        'BY': ('Belarus', 'BLR', '112'),
        'BZ': ('Belize', 'BLZ', '084'),
        'CA': ('Canada', 'CAN', '124'),
        'CC': ('Cocos (keeling) Islands', 'CCK', '166'),
        'CF': ('Central African Republic', 'CAF', '140'),
        'CG': ('Congo', 'COG', '178'),
        'CH': ('Switzerland', 'CHE', '756'),
        'CI': ("Cote D'ivoire", 'CIV', '384'),
        'CK': ('Cook Islands', 'COK', '184'),
        'CL': ('Chile', 'CHL', '152'),
        'CM': ('Cameroon', 'CMR', '120'),
        'CN': ('China', 'CHN', '156'),
        'CO': ('Colombia', 'COL', '170'),
        'CR': ('Costa Rica', 'CRI', '188'),
        'CU': ('Cuba', 'CUB', '192'),
        'CV': ('Cape Verde', 'CPV', '132'),
        'CX': ('Christmas Island', 'CXR', '162'),
        'CY': ('Cyprus', 'CYP', '196'),
        'CZ': ('Czech Republic', 'CZE', '203'),
        'DE': ('Germany', 'DEU', '276'),
        'DJ': ('Djibouti', 'DJI', '262'),
        'DK': ('Denmark', 'DNK', '208'),
        'DM': ('Dominica', 'DMA', '212'),
        'DO': ('Dominican Republic', 'DOM', '214'),
        'DZ': ('Algeria', 'DZA', '012'),
        'EC': ('Ecuador', 'ECU', '218'),
        'EE': ('Estonia', 'EST', '233'),
        'EG': ('Egypt', 'EGY', '818'),
        'EH': ('Western Sahara', 'ESH', '732'),
        'ER': ('Eritrea', 'ERI', '232'),
        'ES': ('Spain', 'ESP', '724'),
        'ET': ('Ethiopia', 'ETH', '231'),
        'FI': ('Finland', 'FIN', '246'),
        'FJ': ('Fiji', 'FJI', '242'),
        'FK': ('Falkland Islands (malvinas)', 'FLK', '238'),
        'FM': ('Micronesia, Federated States of', 'FSM', '583'),
        'FO': ('Faroe Islands', 'FRO', '234'),
        'FR': ('France', 'FRA', '250'),
        'FX': ('France, Metropolitan', 'FXX', '249'),
        'GA': ('Gabon', 'GAB', '266'),
        'GB': ('United Kingdom', 'GBR', '826'),
        'GD': ('Grenada', 'GRD', '308'),
        'GE': ('Georgia', 'GEO', '268'),
        'GF': ('French Guiana', 'GUF', '254'),
        'GH': ('Ghana', 'GHA', '288'),
        'GI': ('Gibraltar', 'GIB', '292'),
        'GL': ('Greenland', 'GRL', '304'),
        'GM': ('Gambia', 'GMB', '270'),
        'GN': ('Guinea', 'GIN', '324'),
        'GP': ('Guadeloupe', 'GLP', '312'),
        'GQ': ('Equatorial Guinea', 'GNQ', '226'),
        'GR': ('Greece', 'GRC', '300'),
        'GS': ('South Georgia and the South Sandwich Islands', 'SGS', '239'),
        'GT': ('Guatemala', 'GTM', '320'),
        'GU': ('Guam', 'GUM', '316'),
        'GW': ('Guinea-bissau', 'GNB', '624'),
        'GY': ('Guyana', 'GUY', '328'),
        'HK': ('Hong Kong', 'HKG', '344'),
        'HM': ('Heard and McDonald Islands', 'HMD', '334'),
        'HN': ('Honduras', 'HND', '340'),
        'HR': ('Croatia (local name: Hrvatska)', 'HRV', '191'),
        'HT': ('Haiti', 'HTI', '332'),
        'HU': ('Hungary', 'HUN', '348'),
        'ID': ('Indonesia', 'IDN', '360'),
        'IE': ('Ireland', 'IRL', '372'),
        'IL': ('Israel', 'ISR', '376'),
        'IN': ('India', 'IND', '356'),
        'IO': ('British Indian Ocean Territory', 'IOT', '086'),
        'IQ': ('Iraq', 'IRQ', '368'),
        'IR': ('Iran (Islamic Republic of)', 'IRN', '364'),
        'IS': ('Iceland', 'ISL', '352'),
        'IT': ('Italy', 'ITA', '380'),
        'JM': ('Jamaica', 'JAM', '388'),
        'JO': ('Jordan', 'JOR', '400'),
        'JP': ('Japan', 'JPN', '392'),
        'KE': ('Kenya', 'KEN', '404'),
        'KG': ('Kyrgyzstan', 'KGZ', '417'),
        'KH': ('Cambodia', 'KHM', '116'),
        'KI': ('Kiribati', 'KIR', '296'),
        'KM': ('Comoros', 'COM', '174'),
        'KN': ('Saint Kitts and Nevis', 'KNA', '659'),
        'KP': ("Korea, Democratic People's Republic of", 'PRK', '408'),
        'KR': ('Korea, Republic of', 'KOR', '410'),
        'KW': ('Kuwait', 'KWT', '414'),
        'KY': ('Cayman Islands', 'CYM', '136'),
        'KZ': ('Kazakhstan', 'KAZ', '398'),
        'LA': ("Lao People's Democratic Republic", 'LAO', '418'),
        'LB': ('Lebanon', 'LBN', '422'),
        'LC': ('Saint Lucia', 'LCA', '662'),
        'LI': ('Liechtenstein', 'LIE', '438'),
        'LK': ('Sri Lanka', 'LKA', '144'),
        'LR': ('Liberia', 'LBR', '430'),
        'LS': ('Lesotho', 'LSO', '426'),
        'LT': ('Lithuania', 'LTU', '440'),
        'LU': ('Luxembourg', 'LUX', '442'),
        'LV': ('Latvia', 'LVA', '428'),
        'LY': ('Libyan Arab Jamahiriya', 'LBY', '434'),
        'MA': ('Morocco', 'MAR', '504'),
        'MC': ('Monaco', 'MCO', '492'),
        'MD': ('Moldova, Republic of', 'MDA', '498'),
        'MG': ('Madagascar', 'MDG', '450'),
        'MH': ('Marshall Islands', 'MHL', '584'),
        'MK': ('Macedonia, The Former Yugoslav Republic of', 'MKD', '807'),
        'ML': ('Mali', 'MLI', '466'),
        'MM': ('Myanmar', 'MMR', '104'),
        'MN': ('Mongolia', 'MNG', '496'),
        'MO': ('Macau', 'MAC', '446'),
        'MP': ('Northern Mariana Islands', 'MNP', '580'),
        'MQ': ('Martinique', 'MTQ', '474'),
        'MR': ('Mauritania', 'MRT', '478'),
        'MS': ('Montserrat', 'MSR', '500'),
        'MT': ('Malta', 'MLT', '470'),
        'MU': ('Mauritius', 'MUS', '480'),
        'MV': ('Maldives', 'MDV', '462'),
        'MW': ('Malawi', 'MWI', '454'),
        'MX': ('Mexico', 'MEX', '484'),
        'MY': ('Malaysia', 'MYS', '458'),
        'MZ': ('Mozambique', 'MOZ', '508'),
        'NA': ('Namibia', 'NAM', '516'),
        'NC': ('New Caledonia', 'NCL', '540'),
        'NE': ('Niger', 'NER', '562'),
        'NF': ('Norfolk Island', 'NFK', '574'),
        'NG': ('Nigeria', 'NGA', '566'),
        'NI': ('Nicaragua', 'NIC', '558'),
        'NL': ('Netherlands', 'NLD', '528'),
        'NO': ('Norway', 'NOR', '578'),
        'NP': ('Nepal', 'NPL', '524'),
        'NR': ('Nauru', 'NRU', '520'),
        'NU': ('Niue', 'NIU', '570'),
        'NZ': ('New Zealand', 'NZL', '554'),
        'OM': ('Oman', 'OMN', '512'),
        'PA': ('Panama', 'PAN', '591'),
        'PE': ('Peru', 'PER', '604'),
        'PF': ('French Polynesia', 'PYF', '258'),
        'PG': ('Papua New Guinea', 'PNG', '598'),
        'PH': ('Philippines', 'PHL', '608'),
        'PK': ('Pakistan', 'PAK', '586'),
        'PL': ('Poland', 'POL', '616'),
        'PM': ('St. Pierre and Miquelon', 'SPM', '666'),
        'PN': ('Pitcairn', 'PCN', '612'),
        'PR': ('Puerto Rico', 'PRI', '630'),
        'PT': ('Portugal', 'PRT', '620'),
        'PW': ('Palau', 'PLW', '585'),
        'PY': ('Paraguay', 'PRY', '600'),
        'QA': ('Qatar', 'QAT', '634'),
        'RE': ('Reunion', 'REU', '638'),
        'RO': ('Romania', 'ROM', '642'),
        'RU': ('Russian Federation', 'RUS', '643'),
        'RW': ('Rwanda', 'RWA', '646'),
        'SA': ('Saudi Arabia', 'SAU', '682'),
        'SB': ('Solomon Islands', 'SLB', '090'),
        'SC': ('Seychelles', 'SYC', '690'),
        'SD': ('Sudan', 'SDN', '736'),
        'SE': ('Sweden', 'SWE', '752'),
        'SG': ('Singapore', 'SGP', '702'),
        'SH': ('St. Helena', 'SHN', '654'),
        'SI': ('Slovenia', 'SVN', '705'),
        'SJ': ('Svalbard and Jan Mayen Islands', 'SJM', '744'),
        'SK': ('Slovakia (slovak Republic)', 'SVK', '703'),
        'SL': ('Sierra Leone', 'SLE', '694'),
        'SM': ('San Marino', 'SMR', '674'),
        'SN': ('Senegal', 'SEN', '686'),
        'SO': ('Somalia', 'SOM', '706'),
        'SR': ('Suriname', 'SUR', '740'),
        'ST': ('Sao Tome and Principe', 'STP', '678'),
        'SV': ('El Salvador', 'SLV', '222'),
        'SY': ('Syrian Arab Republic', 'SYR', '760'),
        'SZ': ('Swaziland', 'SWZ', '748'),
        'TC': ('Turks and Caicos Islands', 'TCA', '796'),
        'TD': ('Chad', 'TCD', '148'),
        'TF': ('French Southern Territories', 'ATF', '260'),
        'TG': ('Togo', 'TGO', '768'),
        'TH': ('Thailand', 'THA', '764'),
        'TJ': ('Tajikistan', 'TJK', '762'),
        'TK': ('Tokelau', 'TKL', '772'),
        'TM': ('Turkmenistan', 'TKM', '795'),
        'TN': ('Tunisia', 'TUN', '788'),
        'TO': ('Tonga', 'TON', '776'),
        'TP': ('East Timor', 'TMP', '626'),
        'TR': ('Turkey', 'TUR', '792'),
        'TT': ('Trinidad and Tobago', 'TTO', '780'),
        'TV': ('Tuvalu', 'TUV', '798'),
        'TW': ('Taiwan, Province of China', 'TWN', '158'),
        'TZ': ('Tanzania, United Republic of', 'TZA', '834'),
        'UA': ('Ukraine', 'UKR', '804'),
        'UG': ('Uganda', 'UGA', '800'),
        'UM': ('United States Minor Outlying Islands', 'UMI', '581'),
        'US': ('United States', 'USA', '840'),
        'UY': ('Uruguay', 'URY', '858'),
        'UZ': ('Uzbekistan', 'UZB', '860'),
        'VA': ('Vatican City State (Holy See)', 'VAT', '336'),
        'VC': ('Saint Vincent and the Grenadines', 'VCT', '670'),
        'VE': ('Venezuela', 'VEN', '862'),
        'VG': ('Virgin Islands (british)', 'VGB', '092'),
        'VI': ('Virgin Islands (u.s.)', 'VIR', '850'),
        'VN': ('Viet Nam', 'VNM', '704'),
        'VU': ('Vanuatu', 'VUT', '548'),
        'WF': ('Wallis and Futuna Islands', 'WLF', '876'),
        'WS': ('Samoa', 'WSM', '882'),
        'YE': ('Yemen', 'YEM', '887'),
        'YT': ('Mayotte', 'MYT', '175'),
        'YU': ('Yugoslavia', 'YUG', '891'),
        'ZA': ('South Africa', 'ZAF', '710'),
        'ZM': ('Zambia', 'ZMB', '894'),
        'ZR': ('Zaire', 'ZAR', '180'),
        'ZW': ('Zimbabwe', 'ZWE', '716')
	}

# Special omake section -- US states & territories:
_us_statecode = {
	'AL': 'Alabama',
	'AK': 'Alaska',
	'AZ': 'Arizona',
	'AR': 'Arkansas',
	'CA': 'California',
	'CO': 'Colorado',
	'CT': 'Connecticut',
	'DE': 'Delaware',
	'DC': 'D.C.',
	'FL': 'Florida',
	'GA': 'Georgia',
	'HI': 'Hawaii',
	'ID': 'Idaho',
	'IL': 'Illinois',
	'IN': 'Indiana',
	'IA': 'Iowa',
	'KS': 'Kansas',
	'KY': 'Kentucky',
	'LA': 'Louisiana',
	'ME': 'Maine',
	'MD': 'Maryland',
	'MA': 'Massachusetts',
	'MI': 'Michigan',
	'MN': 'Minnesota',
	'MS': 'Mississippi',
	'MO': 'Missouri',
	'MT': 'Montana',
	'NE': 'Nebraska',
	'NV': 'Nevada',
	'NH': 'New Hampshire',
	'NJ': 'New Jersey',
	'NM': 'New Mexico',
	'NY': 'New York',
	'NC': 'North Carolina',
	'ND': 'North Dakota',
	'OH': 'Ohio',
	'OK': 'Oklahoma',
	'OR': 'Oregon',
	'PA': 'Pennsylvania',
	'PR': 'Puerto Rico',
	'RI': 'Rhode Island',
	'SC': 'South Carolina',
	'SD': 'South Dakota',
	'TN': 'Tennesee',
	'TX': 'Texas',
	'UT': 'Utah',
	'VT': 'Vermont',
	'VA': 'Virginia',
	'WA': 'Washington',
	'WV': 'West Virginia',
	'WI': 'Wisconsin',
	'WY': 'Wyoming'
	}

